{ INFORMATICS.MCCME.RU
  Problem statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1599
  Verdict: Accepted
}
uses 
	SysUtils, Math;
 
var
	i,ls,kk:longint;
	s:string;
	f:boolean;
 
begin
reset(input,'input.txt');
rewrite(output,'output.txt');
readln(S);
kk:=pos(' ',s);
while kk>0 do begin
	delete(s,kk,1);
	kk:=pos(' ',s);
end;
ls:=length(s);
for i:=1 to ls do begin
	kk:=ord(s[i]);
	if kk in [97..122] then s[i]:=chr(kk-32) else
	if kk in [224..249] then s[i]:=chr(kk-32);
end;
kk:=ls div 2;
f:=true;
for i:=1 to kk do
	if s[i]<>s[ls-i+1] then begin
		f:=false;
		break;
	end;
if f then write('YES') else write('NO');
end.